GCD(n, m)
LCM(n, m)mGCD(x)
mLCM(x)
mGCD
(the multiple GCD) computes the greatest common divisor for
all numbers in the integer vector x
together.
extGCD
, coprime
GCD(12, 10)
GCD(46368, 75025) # Fibonacci numbers are relatively prime to each other
LCM(12, 10)
LCM(46368, 75025) # = 46368 * 75025
mGCD(c(2, 3, 5, 7) * 11)
mGCD(c(2*3, 3*5, 5*7))
mLCM(c(2, 3, 5, 7) * 11)
mLCM(c(2*3, 3*5, 5*7))
Run the code above in your browser using DataLab